package com.teliasonera.crm.testing;

import jxl.Cell;
import se.sigma.selenium.testing.Excel;

/**
 *
 * @author eyh6112
 */
public class CRMDataExcel extends Excel {
    
    private final static int ACCOUNT_NAME = 0;
    private final static int POSTAL_CODE = 1;
    private final static int STREET_ADDRESS = 2;
    private final static int STREET_NUMBER = 3;

    public CRMDataExcel(String workBook) throws Exception {
        super(workBook);
    }

    public String[] getData(int rowNumber) {
        
        Cell[] row = getRow(rowNumber);
        
        String[] data = new String[row.length];
        
        data[ACCOUNT_NAME]   = row[ACCOUNT_NAME].getContents();
        data[POSTAL_CODE]    = row[POSTAL_CODE].getContents();
        data[STREET_ADDRESS] = row[STREET_ADDRESS].getContents();
        data[STREET_NUMBER]  = row[STREET_NUMBER].getContents();

        return data;

    }
}
